﻿using SmartAPI.FileReader.Dto;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WebApiClientCore;
using WebApiClientCore.Attributes;
using WebApiClientCore.Parameters;

namespace SmartAPI.FileReader
{
    public interface IFileReaderApi : IHttpApi
    {
        /// <summary>
        /// 上传⽂件
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        [HttpPost("/service/readFileAsync")]
        Task<BaseResultDto<string>> ReadFileAsync(FormDataFile file);

        /// <summary>
        /// 查询任务结果
        /// </summary>
        /// <param name="taskNo">系统任务号</param>
        /// <returns></returns>
        [HttpGet("/service/getResult")]
        Task<BaseResultDto<FileResultDto>> GetResultAsync(string taskNo);

        /// <summary>
        /// 下载结果⽂件
        /// </summary>
        /// <param name="name">系统任务号</param>
        /// <returns></returns>
        [HttpGet("/service/getResultFile")]
        Task<byte[]> GetResultFileAsync(string name);

        /// <summary>
        /// 上传FTP⽂件
        /// </summary>
        /// <param name="name"></param>
        /// <returns></returns>
        [HttpPost("/service/uploadFTPFile")]
        Task<BaseResultDto<string>> UploadFTPFileAsync([JsonContent]FtpFileUploadDto input);



    }
}
